package com.vshop.service.impl;

import com.vshop.entity.comentity.UserEmailAndDeviceSubscribeInfo;
import com.vshop.mapper.UserEmailAndDeviceSubscribeMapper;
import com.vshop.service.UserEmailAndDeviceSubscribeService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Transactional(rollbackFor = Exception.class)
@Service
public class UserEmailAndDeviceSubscribeServiceImpl implements UserEmailAndDeviceSubscribeService {

    @Resource
    UserEmailAndDeviceSubscribeMapper subscribeMapper;

    @Override
    public void insertSubscribeInfo(UserEmailAndDeviceSubscribeInfo info) {
        subscribeMapper.insertSubscribeInfo(info);
    }

    @Override
    public int queryEmailCodeBydeviceCode(String deviceCode, String partnerCode) {
        return subscribeMapper.queryEmailCodeBydeviceCode(deviceCode, partnerCode);
    }
}
